<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <!-- 引入 css -->
    <link href="/admin/plugin/wangEditor/style.css" rel="stylesheet">
    <!-- 引入 js -->
    <script src="/admin/plugin/wangEditor/index.js"></script>

    <!--引入 element-ui 的样式，-->
    <link rel="stylesheet" href="/admin/plugin/element-ui/index.css">
    <!-- 必须先引入vue，  后使用element-ui -->
    <script type="text/javascript" src="/admin/js-css/js/vue.min.js"></script>
    <!-- 引入element 的组件库-->
    <script type="text/javascript" src="/admin/plugin/element-ui/index.js"></script>

    <script type="text/javascript" src="/admin/plugin/element-ui/httpVueLoader.js"></script>

    <script type="text/javascript" src="/admin/js-css/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="/admin/js-css/js/mx1.0.js?v=1.1"></script>

    <link rel="stylesheet" href="/admin/js-css/css/pageLR.css">

    <script type="text/javascript" src="/admin/pageoffice.js"></script>


</head>
<body>
    <div id="app">

        <div style=" width:auto; height:700px;"  >

        </div>

    </div>

    <script>
        var vm = new Vue({
           el:"#app",
           data:{
               pageofficeObj:""
           },
            created(){
               this.init();
                this.getPageofficeObj();
            },
            methods:{
               init(){
                   po_ajax2({
                       url: "json.htm",
                       success: function (data) {
                           if (data.indexOf('"name":"jsonx"') > 0) {
                               var strtemp = data.split(':');
                               strtemp = strtemp[1].split(',');
                               if (parseInt(strtemp[0]) < 5) {
                                   POBrowser.showInstallDlg();
                                   return
                               }
                               bPOIsInstalled = true;
                               po_ajax({
                                   url: POBrowser.getRootPath() + "/poserver.zz",
                                   type: "POST",
                                   withCred: POBrowser.withCredentials,
                                   headerTok: POBrowser.headerToken,
                                   data: {
                                       Info: "PageOfficeLink",
                                       pageurl: strURL,
                                       options: strOptions + "IsModal=false;",
                                       params: strArgument
                                   },
                                   success: function (data) {
                                       PO_datas = data.split("\r\n");
                                       var strToken = po_hex_md5(POBrowser.strToHexCharCode(PO_datas[0] + POParent));
                                       po_ajax2({
                                           url: "checkopened.htm",
                                           data: {
                                               token: strToken,
                                               open: encodeURIComponent(PO_datas[0] + POParent + "|" + strToken + "|"),
                                               parent: POParent,
                                               Info: PO_datas[1] + "headerToken=" + POBrowser.headerToken + ";"
                                           },
                                           success: function (data) {
                                               //if (data == "false") { }
                                               //	setTimeout("POBrowser.callback2()", 300)
                                           }
                                       })
                                   }
                               })
                           }
                       },
                       error: function (e) {
                           POBrowser.showInstallDlg();
                       }
                   })
               },
                async getPageofficeObj(){
                    const res = await postWebCustom("doc_online-846",{});
                    this.pageofficeObj = res.data;
                }
            }
        });


        function Save() {
            document.getElementById("PageOfficeCtrl1").WebSave();
        }
    </script>
</body>
</html>